package com.funcas.pcloud.upms.facade;

import com.funcas.pcloud.common.ApiResult;
import com.funcas.pcloud.upms.entity.Group;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.websocket.server.PathParam;
import java.util.List;
import java.util.Map;

/**
 * @author funcas
 * @version 1.0
 * @date 2018年10月14日
 */
@RequestMapping("/sys")
public interface GroupRestFacade {

    @RequestMapping(value = "/groups", method = RequestMethod.GET)
    public ApiResult list(Map<String,Object> filter);

    @RequestMapping(value = "/group/{id}", method = RequestMethod.GET)
    public ApiResult edit(@PathParam("id") Long id);

    @RequestMapping(value = "/group", method = RequestMethod.POST)
    public ApiResult save(Group group);

    @RequestMapping(value = "/group/{id}", method = RequestMethod.DELETE)
    public ApiResult delete(@PathParam("id") Long id);

    @RequestMapping(value = "/group/batch", method = RequestMethod.DELETE)
    public ApiResult deleteBatch(List<Long> ids);

}
